import pylab as pl

dimensions = [[0.884372,0.872209, 0.876854,0.867932,0.882017,0.883221,0.864384,0.867764,0.878910,0.874598],
 [0.885912,0.866217, 0.880843,0.863232,0.876832,0.872963,0.869311,0.889322,0.883217,0.864682],
 [0.874502,0.861129, 0.850321,0.859762,0.857471,0.852023,0.860325,0.848740,0.869290,0.856617]]
dx=[1,2,3,4,5,6,7,8,9,10]

s=0
for i in range(10):
  s += dimensions[0][i]
s=s/10
ims=[]

for i in range(10):
  ims.append(s)

print "imporoved smote:"
print s

s=0
for i in range(10):
  s += dimensions[1][i]
s=s/10
trs=[]
for i in range(10):
  trs.append(s)
print "traditional smote:"
print s

s=0
for i in range(10):
  s += dimensions[2][i]
s=s/10
wis=[]
for i in range(10):
  wis.append(s)
print "without smote:"
print s

#10-0,20-10,30-20,40-30,50-40 huatu
pl.xlim([0, 11])
pl.ylim([0.7, 0.9])
pl.plot(dx,dimensions[0],'-xr',label='Accuracy(average=%0.2f)'% ims[0]);
pl.plot(dx,dimensions[1],'-xg',label='AUC Area(average=%0.2f)'% trs[0]);
pl.plot(dx,dimensions[2],'-xb',label='F1-Measure(average=%0.2f)'% wis[0]);
pl.plot(dx,ims,'--r');
pl.plot(dx,trs,'--g');
pl.plot(dx,wis,'--b');
pl.xlabel('Cross-Validation')
pl.ylabel('Rate')
pl.title('Performance evaluation')
pl.legend(loc="lower right")
pl.show()